<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.util.Map"%>
<%@ page import="java.util.List"%>
<%@ page import="jt.classic.system.user.IUser"%>
<%@ page import="jt.classic.system.group.IGroup"%>
<%@ page import="org.limp.mine.DateTrimmer"%>
<%@ page import="org.limp.mine.annex.AnnexInfo"%>
<%
    String context = jt.classic.system.ISystem.getContextPath();

	String day = (String)request.getAttribute("day");
	
	String year = day.substring(0, 4);
	
	String month = day.substring(4, 6);

	IGroup group = (IGroup)request.getAttribute("group");

    List users = (List)request.getAttribute("users");
    
    Map qiandaoMap = (Map)request.getAttribute("qiandaoMap");
    
    Map qiantuiMap = (Map)request.getAttribute("qiantuiMap");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>月考勤统计报表</title>
</head>
<jsp:include page="../head.jsp"></jsp:include>
<script language="javascript" src="<%=context %>/app/kaoqin/js/monthstat.js"></script>
<script language="javascript" src="<%=context %>/resources/common/js/wordbook.js"></script>
<body style="margin:15px;" onload="init('<%=year %>', '<%=month %>');">
<form name="form1" method="post" action="">
<input type="hidden" name="groupId" value="<%=group.id() %>">
<div style="margin:15px;">
   月考勤统计 年&nbsp;:&nbsp;<select name="year"></select>&nbsp;
   月&nbsp;:&nbsp;<select name="month"></select>&nbsp;
   <img src="<%=context %>/app/kaoqin/images/search.gif" style="cursor:hand;" title="提交统计" onclick="javascript:handleQuery();">
</div>
<table align="center" cellspacing="0" cellpadding="0" style="margin:auto;">
    <tr>
        <td height="50"><div>&nbsp;<%=(group != null ? group.iname() : "") %>&nbsp;<%=year %>年<%=Integer.parseInt(month) %>月 考勤统计表</div></td>
    </tr>
</table>
<table align="center" border="1" style="margin:auto;">
   <tr>  
     <td class="td1" align="center" width="50">&nbsp;</td>
     <td class="td1" nowrap width="200"><div align="center">监理人员</div></td>
     <td class="td1" nowrap width="200"><div align="center">签到次数</div></td>
     <td class="td1" nowrap width="200"><div align="center">签退次数</div></td>
   </tr>
   <%
      if(users != null && !users.isEmpty()){
    	  for(int i = 0; i < users.size(); i++){
    		  IUser user = (IUser)users.get(i);
    		  Map qiandaoInfo = (Map)qiandaoMap.get(user.id());
    		  Map qiantuiInfo= (Map)qiantuiMap.get(user.id());
   %>
   <tr>
       <td align="center">&nbsp;<%=(i + 1) %></td>
       <td align="center">&nbsp;<%=user.iname() %></td>
       <td align="center">&nbsp;<%=(qiandaoInfo != null ? (qiandaoInfo.get("CNT")) : "") %></td>
       <td align="center">&nbsp;<%=(qiantuiInfo != null ? (qiantuiInfo.get("CNT")) : "") %></td>
   </tr>
   <%
      	  }
      }
   %>
</table>
</form>
</body>
</html>    